﻿@model pcObjectLibrary.UserObjLibrary
@{
    ViewBag.Title = "User Registration";
}
@*<hgroup class="title">
    <h1>@ViewBag.Title.</h1>
    <h2>You are at: @Html.DisplayTextFor(x => x.lastActivity_ip) @Html.Raw((string)ViewBag.Message)</h2></hgroup>
    <hr />*@

<div class="col-lg-6">
    <div class="well bs-component">
        @using (Ajax.BeginForm("Register", "User", null,
                new AjaxOptions { OnSuccess = "postResponseRegistration" },
                new { @class = "form-horizontal" }))
        {
            <fieldset>
                <legend>@ViewBag.Title</legend>
                <div class="form-group">
                    @Html.LabelFor(x => x.firstName, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.TextBoxFor(x => x.firstName, new { @class = "form-control" })
                        @Html.ValidationMessageFor(x => x.firstName)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.lastName, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.TextBoxFor(x => x.lastName, new { @class = "form-control" })
                        @Html.ValidationMessageFor(x => x.lastName)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.email, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.TextBoxFor(x => x.email, new { @class = "form-control" })
                        @Html.ValidationMessageFor(x => x.email)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.telephone, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.TextBoxFor(x => x.telephone, new { @class = "form-control" })
                        @Html.ValidationMessageFor(x => x.telephone)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.userName, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.TextBoxFor(x => x.userName, new { @class = "form-control" })
                        @Html.ValidationMessageFor(x => x.userName)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.password, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.PasswordFor(x => x.password, new { @class = "form-control" })
                        @Html.ValidationMessageFor(x => x.password)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.registrationCode, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.TextBoxFor(x => x.registrationCode, new { @class = "form-control" })
                        @Html.ValidationMessageFor(x => x.registrationCode)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.userTypeId, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.DropDownListFor(x => x.userTypeId, (IEnumerable<SelectListItem>)ViewBag.UserTypes, "--Select--", htmlAttributes: new { @class = "form-control" })
                        @Html.ValidationMessageFor(x => x.userTypeId)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.registeredTimeZone, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.DropDownListFor(x => x.registeredTimeZone, (IEnumerable<SelectListItem>)Model.timezonesList, "--Select--", new { @class = "k-dropdownTimeZones form-control" })
                        @Html.ValidationMessageFor(x => x.registeredTimeZone)
                    </div>
                </div>
                <div class="col-lg-10 col-lg-offset-2">
                    <input type="submit" value="Sign up" class="btn btn-primary" />
                </div>
            </fieldset>
        }
    </div>
</div>
